package com.education.teach.mvp.model.service;

import com.education.teach.mvp.model.bean.AddCounselBean;
import com.education.teach.mvp.model.bean.AnswerBean;
import com.education.teach.mvp.model.bean.CounselBean;
import com.education.teach.mvp.model.bean.CounselDetailBean;
import com.education.teach.mvp.model.bean.CoursewareBean;
import com.education.teach.mvp.model.bean.ExamBean;
import com.education.teach.mvp.model.bean.LoginBean;
import com.education.teach.mvp.model.bean.MyClassBean;
import com.education.teach.mvp.model.bean.MyCoursewareBean;
import com.education.teach.mvp.model.bean.PaperBean;
import com.education.teach.mvp.model.bean.ReportBean;
import com.education.teach.mvp.model.bean.TimetableBean;
import com.education.teach.mvp.model.bean.WrongBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface ApiService {

    @FormUrlEncoded
    @POST("loginMobile.ajax")
    Observable<LoginBean> login(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("findMyHomeWork.ajax")
    Observable<ExamBean> findHomeWork(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("doHomeWork.ajax")
    Observable<PaperBean> doHomeWork(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("consultationQuestionStList.ajax")
    Observable<CounselBean> consulQuestionList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("saveConsultationQuestion.ajax")
    Observable<CounselDetailBean> saveConsultationQuestion(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("searchDocList.ajax")
    Observable<CoursewareBean> searchDocList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("tsDocument.ajax")
    Observable<MyCoursewareBean> searchDocumentList(@FieldMap Map<String, String> map);

    @Streaming
    @GET
    Observable<ResponseBody> loadFile(@Url String url);

    @FormUrlEncoded
    @POST("myClassWorkList.ajax")
    Observable<MyClassBean> getMyClassList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("myWorkList.ajax")
    Observable<MyClassBean> getMyWorkList(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("findErrQuestionList.ajax")
    Observable<WrongBean> findErrorQes(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("findStudentCourseTable.ajax")
    Observable<TimetableBean> findStudentCourseTable(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("shareWork.ajax")
    Observable<MyClassBean> share(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("getTeacher.ajax")
    Observable<AddCounselBean> getTeacher(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("addConsultationQuestion.ajax")
    Observable<AddCounselBean> addConsultationQuestion(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("searchReport.ajax")
    Observable<ReportBean> searchReport(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("doingHomeWork.ajax")
    Observable<AnswerBean> doingHomeWork(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("submitHomeWork.ajax")
    Observable<AnswerBean> submitHomeWork(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("showConsultationQuestion.ajax")
    Observable<CounselBean> showConsultationQuestion(@FieldMap Map<String, String> map);
}
